import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Regist from '../views/enter/Regist.vue'
import Login from '../views/enter/Login.vue'
import Articledetails from '../views/article/Articledetails.vue'
import Articletitle from '../views/article/Articletitle.vue'
import Interviewdetail from '../views/interview/Interviewdetail.vue'
import Interviewtitle from '../views/interview/Interviewtitle.vue'
import Mydetails from '../views/my/Mydetails.vue'
import Myhome from '../views/my/Myhome.vue'


Vue.use(VueRouter)

const routes = [{
        path: '',
        redirect: '/home'
    },
    {
        path: '/home',
        name: 'Home',
        component: Home
    },
    {
        path: '/regist',
        name: 'regist',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/enter/Regist.vue')
    },
    {
        path: '/login',
        name: 'login',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/enter/Login.vue')
    },
    {
        path: '/articledetails',
        name: 'articledetails',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/article/Articledetails.vue')
    },
    {
        path: '/articletitle',
        name: 'articletitle',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/article/Articletitle.vue')
    },
    {
        path: '/interviewdetail',
        name: 'interviewdetail',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/interview/Interviewdetail.vue')
    },
    {
        path: '/interviewtitle',
        name: 'interviewtitle',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/interview/Interviewtitle.vue')
    },
    {
        path: '/mydetails',
        name: 'mydetails',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/my/Mydetails.vue')
    },
    {
        path: '/myhome',
        name: 'myhome',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/my/Myhome.vue')
    }
]


const router = new VueRouter({
    routes,
    mode: 'history'
})

export default router